﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WebmasterTool/Admin.Master" AutoEventWireup="true" CodeBehind="UploadFile.aspx.cs" Inherits="Framework.WebmasterTool.FileManagers.UploadFile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ctlCaption" runat="Server">
    Upload file
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageContent" runat="Server">
    <asp:Label ID="lblPermissionMessage" runat="server" Font-Bold="true" ForeColor="Red"
        Text="Tài khoản không có quyền truy cập vào trang này" Visible="false"></asp:Label>
    <asp:Panel ID="Panel1" runat="server" Visible="true">
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="File"
            DisplayMode="List" Font-Bold="True" />
        <asp:Label ID="lblMessage" runat="server" Font-Bold="true" ForeColor="Red"></asp:Label>
        <div style="margin-bottom: 5px; margin-top: 10px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Tiêu đề:</span>
            <div>
                <asp:TextBox ID="txtTitle" runat="server" Width="250px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTitle"
                    ErrorMessage="Chưa nhập tiêu đề." ValidationGroup="File" Display="Dynamic">*</asp:RequiredFieldValidator>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Tiêu đề(en):</span>
            <div>
                <asp:TextBox ID="txtTitle_en" runat="server" Width="250px"></asp:TextBox>
            </div>
        </div>
        <div style="clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                height: 200px; margin-right: 5px">Mô tả:</span>
            <div style="float: left">
                <CKEditor:CKEditorControl ID="txtDescription" runat="server" UIColor="#CED9F3" Toolbar="Basic"
                    Width="500" Height="200" BasePath="/Plugins/Ckeditor" ContentsCss="/Plugins/Ckeditor/contents.css"
                    TemplatesFiles="/Plugins/Ckeditor/plugins/templates/templates/default.js"></CKEditor:CKEditorControl>
            </div>
        </div>
        <div style="padding-top: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                height: 200px; margin-right: 5px">Mô tả(en):</span>
            <div style="float: left">
                <CKEditor:CKEditorControl ID="txtDescription_en" runat="server" UIColor="#CED9F3"
                    Toolbar="Basic" Width="500" Height="200" BasePath="/Plugins/Ckeditor" ContentsCss="/Plugins/Ckeditor/contents.css"
                    TemplatesFiles="/Plugins/Ckeditor/plugins/templates/templates/default.js"></CKEditor:CKEditorControl>
            </div>
        </div>
        <div style="margin-bottom: 5px; padding-top: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">User: </span>
            <div>
                <asp:DropDownList ID="ddlUser" runat="server" Width="257" AppendDataBoundItems="true">
                    <asp:ListItem Value="0" Text="Chọn Username" Selected="True"></asp:ListItem>
                </asp:DropDownList>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Upload: </span>
            <div>
                <asp:FileUpload ID="FileUpload1" runat="server" />
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Vị trí: </span>
            <div>
                <asp:TextBox ID="txtDisplayOrder" runat="server" Text="0"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Chưa nhập vị trí cho file"
                    ControlToValidate="txtDisplayOrder" ValidationGroup="File" Display="Dynamic">*</asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtDisplayOrder"
                    Type="Integer" MinimumValue="0" MaximumValue="9999" ValidationGroup="File" ErrorMessage="Vị trí phải từ 0 đến 9999"
                    Display="Dynamic">*</asp:RangeValidator>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Kích hoạt: </span>
            <div>
                <asp:CheckBox ID="chkIsActive" runat="server" Checked="true" Text="Kích hoạt file" />
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Kiểu file: </span>
            <div>
                <asp:Label ID="lblFileType" runat="server"></asp:Label>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">File size: </span>
            <div>
                <asp:Label ID="lblFileSize" runat="server"></asp:Label>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Ngày tạo: </span>
            <div>
                <asp:Label ID="lblAddedDate" runat="server"></asp:Label>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Người tạo: </span>
            <div>
                <asp:Label ID="lblAddedBy" runat="server"></asp:Label>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Ngày update: </span>
            <div>
                <asp:Label ID="lblUpdatedDate" runat="server"></asp:Label>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Người update: </span>
            <div>
                <asp:Label ID="lblUpdatedBy" runat="server"></asp:Label>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 150px; text-align: right; float: left; display: block;
                margin-right: 5px">Download file: </span>
            <div>
                <a id="aDownload" runat="server" target="_blank">Click vào đây để download</a>
            </div>
        </div>
        <div style="margin-bottom: 5px; clear: both;">
            <span style="color: #555; width: 100%; text-align: left; float: left; display: block;
                margin-right: 5px">
                <asp:Button ID="btnSave" runat="server" Text="Lưu" Width="100" ValidationGroup="File"
                    Style="margin-left: 100px" OnClick="btnSave_Click" />
                <asp:Button ID="btnBack" runat="server" Text="Quay về" Width="100" ValidationGroup="File"
                    OnClick="btnBack_Click" /></span>
        </div>
        <div style="float: right; max-width: 300px; padding: 4px; border: solid 1px #ccc;
            margin-right: 15px;">
            <img id="imgImage" alt="" runat="server" src='' style="max-width: 200px" />
        </div>
    </asp:Panel>
</asp:Content>
